-
Notifications
You must be signed in to change notification settings - Fork 1.4k
modules: TF-M: Add TF-M HAL function to enable system off #25801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Vge0rge
commented
Nov 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds TF-M HAL support for system off functionality on nRF54L devices in TF-M SFN mode. The implementation provides a new platform service that allows non-secure applications to request system off mode through a secure service call.
- Adds
tfm_platform_hal_system_offfunction to disable RAM retention and enter system off mode - Introduces
CONFIG_TFM_NRF_SYSTEM_OFF_SERVICEKconfig option with appropriate dependencies - Updates west.yml dependencies to pull in required changes from Zephyr and TF-M repositories
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| west.yml | Updates Zephyr and TF-M revisions to pull PRs with system off support |
| modules/trusted-firmware-m/tfm_boards/src/tfm_platform_system.c | Implements the system off HAL function with RAM retention disable |
| modules/trusted-firmware-m/Kconfig | Adds configuration option for the system off service with appropriate dependencies |
| modules/trusted-firmware-m/CMakeLists.txt | Passes the system off service configuration to TF-M build |
| samples/zephyr/boards/nordic/system_off/boards/*.conf | Enables TFM_SFN and system off service for nRF54L board variants |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
modules/trusted-firmware-m/tfm_boards/src/tfm_platform_system.c
Outdated
Show resolved
Hide resolved
modules/trusted-firmware-m/Kconfig
Outdated
| depends on !RETAINED_MEM_NRF_RAM_CTRL | ||
| select EXPERIMENTAL | ||
| help | ||
| Provide a system off service for the NRF nRF54L series SoCs. |
Copilot
AI
Nov 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Corrected spelling of 'NRF' to 'Nordic nRF' for consistency with standard naming conventions.
| Provide a system off service for the NRF nRF54L series SoCs. | |
| Provide a system off service for the Nordic nRF54L series SoCs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NRF and/or Nordic seems superfluous in an sdk-nrf Kconfig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will remove yeah
|
The following west manifest projects have changed revision in this Pull Request:
⛔ DNM label due to: 2 projects with PR revision Note: This message is automatically posted and updated by the Manifest GitHub Action. |
CI InformationTo view the history of this post, click the 'edited' button above Inputs:Sources:trusted-firmware-m: PR head: 3df8d8bf82ad15e6cdcadb19f534a25103ada811 more detailstrusted-firmware-m:
sdk-nrf:
zephyr:
Github labels
List of changed files detected by CI (14)Outputs:ToolchainVersion: 964ddb2c70 Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
2603256 to
b8abb4f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Ping @nrfconnect/ncs-co-build-system @nrfconnect/ncs-low-level-test @nrfconnect/ncs-code-owners |
| prompt "[EXPERIMENTAL] TF-M NRF System Off Service" | ||
| depends on TFM_ISOLATION_LEVEL = 1 | ||
| depends on TFM_SFN | ||
| depends on SOC_SERIES_NRF54LX |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about nRF71?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not urgent. Post NCS 3.2, unless adding this doesn't delay the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot test it so I will not add it myself now. It can be added later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @travis3630
modules/trusted-firmware-m/tfm_boards/src/tfm_platform_system.c
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Please add also configuration for other places where system_off is tested: |
a8a9930 to
b84fe8a
Compare
These needs more work (I tried with my board and they don't work for NS) and this PR is already tight for the release. So I prefer to try to get that in as is and add support for these samples later. |
b84fe8a to
250b445
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
You can find the documentation preview for this PR here. |
tomi-font
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Release notes entry?
| prompt "[EXPERIMENTAL] TF-M NRF System Off Service" | ||
| depends on TFM_ISOLATION_LEVEL = 1 | ||
| depends on TFM_SFN | ||
| depends on SOC_SERIES_NRF54LX |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @travis3630
Will be done later, since docs can be merged after the code freeze and this is already tight I don't want to include it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d79f8b6 to
0efda1f
Compare
Add the tfm_platform_hal_system_off function which puts the device in system off. This only needed for nRF54L devices at the moment and only in TF-M SFN mode. Signed-off-by: Georgios Vasilakis <[email protected]>
With updates which allows using system off from TF-M. Signed-off-by: Georgios Vasilakis <[email protected]>
Add an overlay for the nRF54L devices which support TF-M with system off. This is needed because the feature is not enabled by default and it also have requirements which deviate from the default TF-M configuration. Signed-off-by: Georgios Vasilakis <[email protected]>
0efda1f to
595322c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.